﻿using System;
using System.Linq;
using System.Collections.Generic;

using SSTU.Contract.Common;
using SSTU.Model;

namespace SSTU.Contract.Facade
{
	/// <summary>
	/// Contract for facade, which provides data about university structure, faculties and etc.
	/// </summary>
	public interface IStructureFacade
	{
		/// <summary>
		/// Loads the faculties asynchronously and invoke callback.
		/// </summary>
		/// <param name="asyncCallback">The asynchronous callback.</param>
		void LoadFacultiesAsync(FacadeAsyncCallback<IEnumerable<Faculty>> asyncCallback);

		/// <summary>
		/// Loads the groups, by faculty identifier, asynchronously and invoke callback.
		/// </summary>
		/// <param name="facultyId">The faculty identifier.</param>
		/// <param name="asyncCallback">The asynchronous callback.</param>
		void LoadGroupsAsync(string facultyId, FacadeAsyncCallback<IEnumerable<Group>> asyncCallback);

		/// <summary>
		/// Loads the group, by identifier, asynchronously and invoke callback.
		/// </summary>
		/// <param name="groupId">The group identifier.</param>
		/// <param name="asyncCallback">The asynchronous callback.</param>
		void LoadGroupAsync(string groupId, FacadeAsyncCallback<Group> asyncCallback);

		/// <summary>
		/// Adds the group, by identifier, to favorites asynchronously and invoke callback.
		/// </summary>
		/// <param name="groupId">The group identifier.</param>
		/// <param name="asyncCallback">The async callback.</param>
		void AddGroupToFavoritesAsync(string groupId, FacadeAsyncCallback asyncCallback);

		/// <summary>
		/// Removes the group, by identifier, from favorites asynchronously and invoke callback.
		/// </summary>
		/// <param name="groupId">The group identifier.</param>
		/// <param name="asyncCallback">The async callback.</param>
		void RemoveGroupFromFavoritesAsync(string groupId, FacadeAsyncCallback asyncCallback);

		/// <summary>
		/// Loads the favorite groups asynchronously and invoke callback.
		/// </summary>
		/// <param name="asyncCallback">The async callback.</param>
		void LoadFavoriteGroupsAsync(FacadeAsyncCallback<IEnumerable<Group>> asyncCallback);
	}
}
